package com.t.bricks.bussiness.db.entity.customergoldroll.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.t.bricks.annotation.DataInfo;

/**
 * 顾客所持代金卷'CustomerGoldRoll'表实体类
 * 警告:非数据库字段禁止在此添加,应该创建扩展实体中添加
 * @author HuangXinBian
 */
@ApiModel("顾客所持代金卷CustomerGoldRoll")
@DataInfo(sDbName="BricksMall", sTableName="CustomerGoldRoll")
public class CustomerGoldRollBase implements Serializable {

	private static final long serialVersionUID = 1L;// 使用rmi时需修改

	/**
	 * 记录编号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="uId", sComment="记录编号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=true, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=0 )
	@ApiModelProperty(value="记录编号", example="", position=0)
	//[end]
	protected String uId;

	/**
	 * 顾客账号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="sCustomerId", sComment="顾客账号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=1 )
	@ApiModelProperty(value="顾客账号", example="", position=1)
	//[end]
	protected String sCustomerId;

	/**
	 * 代金卷号码
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="sGoldRollNo", sComment="代金卷号码", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=2 )
	@ApiModelProperty(value="代金卷号码", example="", position=2)
	//[end]
	protected String sGoldRollNo;
	
	/**
	 * 单张金额(元)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="mPrice", sComment="单张金额(元)", isDbField=true, sDbFileType="decimal",
		sDefaultData="0.01", isExtra=false, iskey=false, isNull=true,
		iMaxLength=10, isDecimal=false, iIntegralLength=6, iDecimalLength=2, iIndex=3 )
	@ApiModelProperty(value="单张金额(元)", example="0.01", position=3)
	//[end]
	protected BigDecimal mPrice;

	/**
	 * 商品编号(若不限定商品则为NULL)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="sGoodsId", sComment="商品编号(若不限定商品则为NULL)", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=true,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=4 )
	@ApiModelProperty(value="商品编号(若不限定商品则为NULL)", example="", position=4)
	//[end]
	protected String sGoodsId;

	/**
	 * 是否可以累加(布尔值,1:是;2:否)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="iSummation", sComment="是否可以累加(布尔值,1:是;2:否)", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=5 )
	@ApiModelProperty(value="是否可以累加(布尔值,1:是;2:否)", example="1", position=5)
	//[end]
	protected Integer iSummation;

	/**
	 * 所持数量
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="iCount", sComment="所持数量", isDbField=true, sDbFileType="int",
		sDefaultData="0", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=6 )
	@ApiModelProperty(value="所持数量", example="0", position=6)
	//[end]
	protected Integer iCount;
	
	/**
	 * 最小金额限制(元)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="mMinMoney", sComment="最小金额限制(元)", isDbField=true, sDbFileType="decimal",
		sDefaultData="0.00", isExtra=false, iskey=false, isNull=true,
		iMaxLength=10, isDecimal=false, iIntegralLength=6, iDecimalLength=2, iIndex=7 )
	@ApiModelProperty(value="最小金额限制(元)", example="0.00", position=7)
	//[end]
	protected BigDecimal mMinMoney;

	/**
	 * 加入时间
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//解决表单提交时字符串时间值错误
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="dAddDate", sComment="加入时间", isDbField=true, sDbFileType="datetime",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=23, isDecimal=false, iIntegralLength=-1, iDecimalLength=-1, iIndex=8 )
	@ApiModelProperty(value="加入时间", example="", position=8)
	//[end]
	protected Date dAddDate;

	/**
	 * 过期时间
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//解决表单提交时字符串时间值错误
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="dOverdueDate", sComment="过期时间", isDbField=true, sDbFileType="datetime",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=23, isDecimal=false, iIntegralLength=-1, iDecimalLength=-1, iIndex=9 )
	@ApiModelProperty(value="过期时间", example="", position=9)
	//[end]
	protected Date dOverdueDate;

	/**
	 * 备注
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="sMemo", sComment="备注", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=true,
		iMaxLength=200, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=10 )
	@ApiModelProperty(value="备注", example="", position=10)
	//[end]
	protected String sMemo;

	/**
	 * 创建人
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="sCreator", sComment="创建人", isDbField=true, sDbFileType="varchar",
		sDefaultData="00000000", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=11 )
	@ApiModelProperty(value="创建人", example="00000000", position=11)
	//[end]
	protected String sCreator;

	/**
	 * 创建日期
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//解决表单提交时字符串时间值错误
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="dCreateDate", sComment="创建日期", isDbField=true, sDbFileType="datetime",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=23, isDecimal=false, iIntegralLength=-1, iDecimalLength=-1, iIndex=12 )
	@ApiModelProperty(value="创建日期", example="", position=12)
	//[end]
	protected Date dCreateDate;

	/**
	 * 修改人
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="sModifieder", sComment="修改人", isDbField=true, sDbFileType="varchar",
		sDefaultData="00000000", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=13 )
	@ApiModelProperty(value="修改人", example="00000000", position=13)
	//[end]
	protected String sModifieder;

	/**
	 * 修改日期
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//解决表单提交时字符串时间值错误
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="dModifiedDate", sComment="修改日期", isDbField=true, sDbFileType="datetime",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=23, isDecimal=false, iIntegralLength=-1, iDecimalLength=-1, iIndex=14 )
	@ApiModelProperty(value="修改日期", example="", position=14)
	//[end]
	protected Date dModifiedDate;

	/**
	 * 状态(枚举,1:待用;2:已用;3:过期;4失效)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="iState", sComment="状态(枚举,1:待用;2:已用;3:过期;4失效)", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=15 )
	@ApiModelProperty(value="状态(枚举,1:待用;2:已用;3:过期;4失效)", example="1", position=15)
	//[end]
	protected Integer iState;

	/**
	 * 序号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="iIndex", sComment="序号", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=16 )
	@ApiModelProperty(value="序号", example="1", position=16)
	//[end]
	protected Integer iIndex;

	/**
	 * 版本
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="CustomerGoldRoll",
		sName="iVersion", sComment="版本", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=17 )
	@ApiModelProperty(value="版本", example="1", position=17)
	//[end]
	protected Integer iVersion;

	/**
	 * 取 记录编号
	 * @return String
	 */
	public String getuId() {
		return uId;
	}

	/**
	 * 设置记录编号
	 * @param uId
	 */
	public void setuId(String uId) {
		this.uId = uId;
	}

	/**
	 * 取 顾客账号
	 * @return String
	 */
	public String getsCustomerId() {
		return sCustomerId;
	}

	/**
	 * 设置顾客账号
	 * @param sCustomerId
	 */
	public void setsCustomerId(String sCustomerId) {
		this.sCustomerId = sCustomerId;
	}

	/**
	 * 取 代金卷号码
	 * @return String
	 */
	public String getsGoldRollNo() {
		return sGoldRollNo;
	}

	/**
	 * 设置代金卷号码
	 * @param sGoldRollNo
	 */
	public void setsGoldRollNo(String sGoldRollNo) {
		this.sGoldRollNo = sGoldRollNo;
	}

	/**
	 * 取 单张金额(元)
	 * @return Long
	 */
	public BigDecimal getmPrice() {
		return mPrice;
	}

	/**
	 * 设置 单张金额(元)
	 * @param mPrice
	 */
	public void setmPrice(BigDecimal mPrice) {
		this.mPrice = mPrice;
	}

	/**
	 * 取 商品编号(若不限定商品则为NULL)
	 * @return String
	 */
	public String getsGoodsId() {
		return sGoodsId;
	}

	/**
	 * 设置商品编号(若不限定商品则为NULL)
	 * @param sGoodsId
	 */
	public void setsGoodsId(String sGoodsId) {
		this.sGoodsId = sGoodsId;
	}

	/**
	 * 取 是否可以累加(布尔值,1:是;2:否)
	 * @return Integer
	 */
	public Integer getiSummation() {
		return iSummation;
	}

	/**
	 * 设置是否可以累加(布尔值,1:是;2:否)
	 * @param iSummation
	 */
	public void setiSummation(Integer iSummation) {
		this.iSummation = iSummation;
	}

	/**
	 * 取 所持数量
	 * @return Integer
	 */
	public Integer getiCount() {
		return iCount;
	}

	/**
	 * 设置所持数量
	 * @param iCount
	 */
	public void setiCount(Integer iCount) {
		this.iCount = iCount;
	}

	/**
	 * 取 最小金额限制(元)
	 * @return Long
	 */
	public BigDecimal getmMinMoney() {
		return mMinMoney;
	}

	/**
	 * 设置 最小金额限制(元)
	 * @param mMinMoney
	 */
	public void setmMinMoney(BigDecimal mMinMoney) {
		this.mMinMoney = mMinMoney;
	}

	/**
	 * 取 加入时间
	 * @return Date
	 */
	public Date getdAddDate() {
		return dAddDate;
	}

	/**
	 * 设置加入时间
	 * @param dAddDate
	 */
	public void setdAddDate(Date dAddDate) {
		this.dAddDate = dAddDate;
	}

	/**
	 * 取 过期时间
	 * @return Date
	 */
	public Date getdOverdueDate() {
		return dOverdueDate;
	}

	/**
	 * 设置过期时间
	 * @param dOverdueDate
	 */
	public void setdOverdueDate(Date dOverdueDate) {
		this.dOverdueDate = dOverdueDate;
	}

	/**
	 * 取 备注
	 * @return String
	 */
	public String getsMemo() {
		return sMemo;
	}

	/**
	 * 设置备注
	 * @param sMemo
	 */
	public void setsMemo(String sMemo) {
		this.sMemo = sMemo;
	}

	/**
	 * 取 创建人
	 * @return String
	 */
	public String getsCreator() {
		return sCreator;
	}

	/**
	 * 设置创建人
	 * @param sCreator
	 */
	public void setsCreator(String sCreator) {
		this.sCreator = sCreator;
	}

	/**
	 * 取 创建日期
	 * @return Date
	 */
	public Date getdCreateDate() {
		return dCreateDate;
	}

	/**
	 * 设置创建日期
	 * @param dCreateDate
	 */
	public void setdCreateDate(Date dCreateDate) {
		this.dCreateDate = dCreateDate;
	}

	/**
	 * 取 修改人
	 * @return String
	 */
	public String getsModifieder() {
		return sModifieder;
	}

	/**
	 * 设置修改人
	 * @param sModifieder
	 */
	public void setsModifieder(String sModifieder) {
		this.sModifieder = sModifieder;
	}

	/**
	 * 取 修改日期
	 * @return Date
	 */
	public Date getdModifiedDate() {
		return dModifiedDate;
	}

	/**
	 * 设置修改日期
	 * @param dModifiedDate
	 */
	public void setdModifiedDate(Date dModifiedDate) {
		this.dModifiedDate = dModifiedDate;
	}

	/**
	 * 取 状态(枚举,1:待用;2:已用;3:过期;4失效)
	 * @return Integer
	 */
	public Integer getiState() {
		return iState;
	}

	/**
	 * 设置状态(枚举,1:待用;2:已用;3:过期;4失效)
	 * @param iState
	 */
	public void setiState(Integer iState) {
		this.iState = iState;
	}

	/**
	 * 取 序号
	 * @return Integer
	 */
	public Integer getiIndex() {
		return iIndex;
	}

	/**
	 * 设置序号
	 * @param iIndex
	 */
	public void setiIndex(Integer iIndex) {
		this.iIndex = iIndex;
	}

	/**
	 * 取 版本
	 * @return Integer
	 */
	public Integer getiVersion() {
		return iVersion;
	}

	/**
	 * 设置版本
	 * @param iVersion
	 */
	public void setiVersion(Integer iVersion) {
		this.iVersion = iVersion;
	}

	/**
	 * 复制对象
	 * @param source 数据源
	 * @return CustomerGoldRollBase
	 */
	public static CustomerGoldRollBase copy(CustomerGoldRollBase source) {
		if (null == source) {
			return null;
		}
		
		CustomerGoldRollBase target = new CustomerGoldRollBase();
		target.setuId(source.getuId());
		target.setsCustomerId(source.getsCustomerId());
		target.setsGoldRollNo(source.getsGoldRollNo());
		target.setmPrice(source.getmPrice());
		target.setsGoodsId(source.getsGoodsId());
		target.setiSummation(source.getiSummation());
		target.setiCount(source.getiCount());
		target.setmMinMoney(source.getmMinMoney());
		target.setdAddDate(source.getdAddDate());
		target.setdOverdueDate(source.getdOverdueDate());
		target.setsMemo(source.getsMemo());
		target.setsCreator(source.getsCreator());
		target.setdCreateDate(source.getdCreateDate());
		target.setsModifieder(source.getsModifieder());
		target.setdModifiedDate(source.getdModifiedDate());
		target.setiState(source.getiState());
		target.setiIndex(source.getiIndex());
		target.setiVersion(source.getiVersion());

		return target;
	}
	
	/**
	 * 克隆对象
	 * @return CustomerGoldRollBase
	 */
	public CustomerGoldRollBase clone() {
		return copy(this);
	}
	
}
